package com.szt;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.nio.charset.Charset;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import com.google.common.io.Files;

/***
 * 测试
 * 
 * @author wwy
 *
 */
public class T2 {
	public static void main(String[] args) throws FileNotFoundException {
		File file = new File("D:/stsworkspace/Sy/src/test/java/com/szt/aa");
		BufferedReader reader = Files.newReader(file, Charset.forName("UTF-8"));
		Stream<String> lines = reader.lines();
		List<String> list = lines
				.map(n -> n.replaceAll("<th class=\"center\">", "titles.add(\"").replaceAll("</th>", "\");"))
				.collect(Collectors.toList());
		for (String str : list) {
			System.out.println(str);
		}
	}
}
